package com.guxingke.gblog.dao.impl;

import com.guxingke.gblog.dao.UserDao;
import com.guxingke.gblog.dmo.User;
import com.guxingke.gblog.dto.UserDto;

public class UserDaoImpl extends BaseDao implements UserDao {
	private UserDao dao = null;

	@Override
	public UserDto login(User user) throws Exception {
		begin();
		dao = session.getMapper(UserDao.class);
		UserDto result = dao.login(user);
		end();
		return result;
	}

	@Override
	public void save(User user) throws Exception {
		begin();
		dao = session.getMapper(UserDao.class);
		dao.save(user);
		end();
		return;
	}

	@Override
	public void update(User user) throws Exception {
		begin();
		dao = session.getMapper(UserDao.class);
		dao.update(user);
		end();
		return;
	}

}
